package com.ecloud.gardensterminal.controller.vo;

import com.ecloud.gardensterminal.controller.dto.GardensDeviceAreaDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author Squbi
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GardensDeviceSwitchInfoVo {
    private Integer deviceId;
    private Integer deviceType;
    private String devicePort;
    private Integer deviceAddress;
    private Integer areaId;
    private String areaName;
    private String areaDescription;
    private Boolean switchOpen;
    private LocalDateTime switchTime;

    public GardensDeviceSwitchInfoVo(GardensDeviceAreaVo vo, Boolean switchOpen, LocalDateTime switchTime) {
        this.deviceId = vo.getDeviceId();
        this.deviceType = vo.getDeviceType();
        this.devicePort = vo.getDevicePort();
        this.deviceAddress = vo.getDeviceAddress();
        this.areaId = vo.getAreaId();
        this.areaName = vo.getAreaName();
        this.areaDescription = vo.getAreaDescription();
        this.switchOpen = switchOpen;
        this.switchTime = switchTime;
    }
}
